home *** CD-ROM | disk | FTP | other *** search
/ Word Play Farm / Word Play Farm.iso / pc / wordplay.exe / wordplay.DXR / 00016.ls < prev    next >
Encoding:
Text File  |  1996-06-05  |  1.5 KB  |  70 lines

  1. on initRearWindow
  2.   global rwObj, gMaxColors, deskTopPattern, black
  3.   if factory("RearWindow") = 0 then
  4.     openXLib("RearWindow.XObj")
  5.   end if
  6.   initGlobals()
  7.   if objectp(rwObj) then
  8.     rwObj(mdispose)
  9.   end if
  10.   makeObjIfNeeded()
  11. end
  12.  
  13. on releaseRearWindow
  14.   global rwObj
  15.   if objectp(rwObj) then
  16.     rwObj(mdispose)
  17.   end if
  18.   closeXLib()
  19.   set the mouseDownScript to EMPTY
  20.   set the keyDownScript to EMPTY
  21. end
  22.  
  23. on initGlobals
  24.   global white, ltGray, gray, dkGray, black, deskTopPattern
  25.   set white to -1
  26.   set ltGray to -2
  27.   set gray to -3
  28.   set dkGray to -4
  29.   set black to -5
  30.   set deskTopPattern to -99
  31. end
  32.  
  33. on coverDesktop patVar
  34.   global rwObj
  35.   makeObjIfNeeded()
  36.   rwObj(mPatToWindow, patVar)
  37. end
  38.  
  39. on unCoverDesktop
  40.   global rwObj
  41.   if objectp(rwObj) then
  42.     rwObj(mdispose)
  43.   end if
  44.   unLoad()
  45. end
  46.  
  47. on makeObjIfNeeded
  48.   global rwObj
  49.   if not objectp(rwObj) then
  50.     set rwObj to RearWindow(mnew, "M")
  51.     if value(rwObj) < 0 then
  52.       alert("System error" && rwObj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  53.       stopMovie()
  54.       exit
  55.     end if
  56.     if the freeBlock < rwObj(mGetMemoryNeeded) then
  57.       if objectp(rwObj) then
  58.         rwObj(mdispose)
  59.         set rwObj to RearWindow(mnew, "S")
  60.       end if
  61.       if value(rwObj) < 0 then
  62.         alert("System error" && rwObj && "trying to create the RearWindow object in RAM (single-monitor config).")
  63.         stopMovie()
  64.         exit
  65.       end if
  66.       writeStageAndScreenBounds()
  67.     end if
  68.   end if
  69. end
  70.